package org.example.tlias.controller;

import org.example.tlias.pojo.JobOption;
import org.example.tlias.pojo.Result;
import org.example.tlias.services.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    private ReportService reportService;
    @GetMapping("empJobData")
    public Result empJobData() {
       JobOption jobOption = reportService.getEmpJobData();
        return Result.success(jobOption);
    }
    /**
     * 统计员工性别信息
     */
    @GetMapping("/empGenderData")
    public Result getEmpGenderData(){
        List<Map> genderList = reportService.getEmpGenderData();
        return Result.success(genderList);
    }
}
